const openid = uni.getStorageSync('openid')
const app = getApp()
export default {
	data() {
		return {
			// 默认的全局分享内容
		}
	},
	onLoad(e) {
		console.log(app.globalData.openid)
		if (app.globalData.openid) {
			console.log(app.globalData.openid)
			uni.login({
				provider: "weixin",
				success: function(loginRes) {
					uni.request({
							header: {
								'Content-Type': 'application/x-www-form-urlencoded'
							},
							url: _this.$scope.globalData.Domain_Name + "/sv/WXSecret",
							method: "POST",
							data: {
								Data: loginRes.code
							},
							success: (re) => {
								console.log('re',re)
								app.globalData.openid = re.data.openid
							}
						})
				},
			})
		}
	},
}